<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<div style="margin-left: 10px;padding: 10px 0;">
	<span class="folder-goback" style="margin-right: 10px;cursor: pointer;">返回上一级</span>
	<ul class="breadcrumb path-ul" style="display: inline;">
		
	</ul>
</div>

<script type="text/javascript">
function setHomePath(){
	$(".path-ul li").remove();
	$(".folder-goback").hide();
	$(".path-ul").append("<li data-id='0' class='active'>文件柜</li>");
	
	$(".folder-goback").on("click",function(){
		
		if($(".path-ul li").length<=1){
			return;
		}	
		var clickCount=$(".path-ul li").length-2;
		$(".path-ul li:eq("+clickCount+")").trigger("click");
	})
}
function setNextPath(showName,thisId){
	//去掉active
	$(".path-ul li.active").removeClass("active");
	$(".path-ul").append("<li data-id='"+thisId+"' class='active'>"+showName+"</li>");
	
	bindPathClick();
	
	$(".folder-goback").show();
}

function bindPathClick(){
	$(".path-ul li").unbind("click");
	$(".path-ul li:not(.active)").on("click",function(){
		$(this).nextAll().remove();
		$(this).addClass("active");
		
		if($(".path-ul li").length==1){
			$(".folder-goback").hide();
		}
		
		var id=$(this).attr("data-id");
		
		$("#parentId").val(id);
		$("#parentLevel").val($(".path-ul li").length-1);
		
		loadOutput();
	});
	
	
	
	
}
</script>
